package com.trg.generaltool.util.thread;

import java.util.concurrent.Callable;

/**
 * ClassName: Calc
 * Description:
 * date: 2020-11-02 16:19
 *
 * @author tangrg
 * @since JDK 1.8
 */
public class Calc implements Runnable {

    private int a;
    private int b;

    public Calc(int a, int b) {
        this.a = a;
        this.b = b;
    }


    public void plus() {
        System.out.println(Thread.currentThread().getName());

        int c = a + b;
        System.out.println("当前计算结果"+c);
    }


    @Override
    public void run() {
        plus();
    }
}
